Skip to content

Build native modules with electron runtime#70

Merged
rkistner merged 10 commits intomasterfrom
build-with-electron
Feb 19, 2021
Merged

Build native modules with electron runtime#70
rkistner merged 10 commits intomasterfrom
build-with-electron

Conversation

@rkistner
Copy link
Copy Markdown
Member

Target electron runtime to build the name module with node-pre-gyp. This forces the external openssl library to be linked, instead of Node's one.

This now also runs tests using electron-mocha on Windows again.

The issue was that since version 5.0.0, we use the same native modules for both NodeJS and Electron, which is possible from using NAPI. But when building for Node, Node's internal OpenSSL symbols are used, and these are not available in Electron, causing a crash when running in Electron on Windows.

See this for details: https://www.electronjs.org/blog/electron-internals-using-node-as-a-library#shared-library-or-static-library

Fixes #67.

@epieddy
Copy link
Copy Markdown

epieddy commented Feb 19, 2021

Yes !! \o/ This seems very promising. My project has been stuck at Electron 9 for a very long time because of this issue. Hope this is the one.

Copy link
Copy Markdown
Contributor

@WesselWessels WesselWessels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rkistner rkistner merged commit 0ebed6d into master Feb 19, 2021
@rkistner rkistner deleted the build-with-electron branch February 19, 2021 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Electron crash on Windows on v5.0.0

3 participants